From: Boyuan Yang Date: Tue, 9 Sep 2025 12:21:38 +0000 (-0400) Subject: Fix FTBFS with gcc-15 X-Git-Tag: archive/raspbian/1.1.9+ds1-4+rpi1^2^2~11 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=60af3b141e49343d84b2538be3e0ae51da17cb84;p=opencc.git Fix FTBFS with gcc-15 --- diff --git a/debian/changelog b/debian/changelog index e340210..18981b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +opencc (1.1.9+ds1-2) unstable; urgency=medium + + * debian/patches/backport/0006-Fix-build-for-gcc-15-934.patch, + debian/patches/backport/0007-Fix-deprecated-declarations-in-C-17.patch: + Backport upstream patches to fix FTBFS with GCC 15. (Closes: #1097512) + + -- Boyuan Yang Tue, 09 Sep 2025 08:20:41 -0400 + opencc (1.1.9+ds1-1) unstable; urgency=medium * Upload to unstable. diff --git a/debian/patches/backport/0006-Fix-build-for-gcc-15-934.patch b/debian/patches/backport/0006-Fix-build-for-gcc-15-934.patch new file mode 100644 index 0000000..e53d301 --- /dev/null +++ b/debian/patches/backport/0006-Fix-build-for-gcc-15-934.patch @@ -0,0 +1,23 @@ +From: Peng Wu +Date: Thu, 13 Feb 2025 00:15:10 +0800 +Subject: Fix build for gcc 15 (#934) + +Co-authored-by: Peng Wu +Bug-Debian: https://bugs.debian.org/1097512 +--- + src/SerializedValues.hpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/SerializedValues.hpp b/src/SerializedValues.hpp +index c17210b..f7e5bb2 100644 +--- a/src/SerializedValues.hpp ++++ b/src/SerializedValues.hpp +@@ -18,6 +18,8 @@ + + #pragma once + ++#include ++ + #include "Common.hpp" + #include "SerializableDict.hpp" + diff --git a/debian/patches/backport/0007-Fix-deprecated-declarations-in-C-17.patch b/debian/patches/backport/0007-Fix-deprecated-declarations-in-C-17.patch new file mode 100644 index 0000000..73f1f57 --- /dev/null +++ b/debian/patches/backport/0007-Fix-deprecated-declarations-in-C-17.patch @@ -0,0 +1,33 @@ +From: WhiredPlanck +Date: Sat, 5 Jul 2025 03:57:30 +0800 +Subject: Fix deprecated declarations in C++17 + +--- + src/Segments.hpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/Segments.hpp b/src/Segments.hpp +index 2186dfd..57320fe 100644 +--- a/src/Segments.hpp ++++ b/src/Segments.hpp +@@ -18,6 +18,7 @@ + + #pragma once + ++#include + #include + + #include "Common.hpp" +@@ -53,8 +54,11 @@ public: + managed.push_back(str); + } + +- class iterator : public std::iterator { ++ class iterator { + public: ++ using iterator_category = std::input_iterator_tag; ++ using value_type = const char*; ++ + iterator(const Segments* const _segments, size_t _cursor) + : segments(_segments), cursor(_cursor) {} + diff --git a/debian/patches/series b/debian/patches/series index a577d9a..eb0994e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,5 @@ 0003-no-remote-images-when-reading-docs-on-disk.patch 0004-Use-system-googletest.patch 0005-Disable-build-in-setup.py.patch +backport/0006-Fix-build-for-gcc-15-934.patch +backport/0007-Fix-deprecated-declarations-in-C-17.patch